interface Person {
  name: string;
  age: string;
}

interface Person {
  sex: string;
}

interface Arr {
  [index: number]: any;
  length: number;
}

const arr: Arr = [1, 2];

interface Fn {
  (x: number, y: number): number;
}

type P1 = { name: string };
type P2 = { age: string };
type A1 = number[];
type F1 = (x: number, y: number) => number;
type Str = string;
// type P1 = { age: number }
type P3 = P1 & P2; // 交叉类型
